package com.sntk.organauthomanager.infrastructure.db.repository;

import com.sntk.organauthomanager.infrastructure.db.entity.RoleResourceEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @ClassName: RoleResourceDBRepository
 * @author: wgchao
 * @createTime: 2020/7/21 7:38 PM
 * @Description: TODO
 */
@Component
public interface RoleResourceDBRepository extends JpaRepository<RoleResourceEntity, Long> {
    List<RoleResourceEntity> findAllByRoleCodeAndInstitutionNumber(String roleCode, String institutionNumber);
    void deleteAllByRoleCodeAndInstitutionNumber(String roleCode, String institutionNumber);
    void deleteAllByResourceMark(String resourceMark);
}
